#import "ThistleWonderController.h"
        
#import "ThistleWonderModel.h"
#import "ThistleWonderCell.h"
#import "Masonry.h"

@interface ThistleWonderController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *navigateTableView;
@property (nonatomic, strong) NSMutableArray *euphoriaDriftwoodModels;

@end

@implementation ThistleWonderController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self voyageSetupview];
	[self conquerKnotSoarrequestData];
}


//: 获取数据模型
- (void)conquerKnotSoarrequestData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)euphoriaDriftwoodModels {
	if (!_euphoriaDriftwoodModels) {
		_euphoriaDriftwoodModels = [NSMutableArray array];
	}
	return _euphoriaDriftwoodModels;
}

- (void)voyageSetupview {
    self.navigateTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.navigateTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
    self.navigateTableView.estimatedRowHeight = 0;
    self.navigateTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.navigateTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
    self.navigateTableView.delegate = self;
    self.navigateTableView.dataSource = self;
    self.navigateTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
    self.navigateTableView.showsVerticalScrollIndicator = NO;
    self.navigateTableView.showsHorizontalScrollIndicator = NO;
    self.navigateTableView.backgroundColor = UIColor.clearColor;
    [self.navigateTableView registerClass:[ThistleWonderCell class] forCellReuseIdentifier:NSStringFromClass([ThistleWonderCell class])];
    [self.view addSubview:self.navigateTableView];
    [self.navigateTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self.view);
        make.top.equalTo(self.view);
        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
    }];
}

#pragma mark - UITableView DataSource 
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.euphoriaDriftwoodModels.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ThistleWonderCell *laughPrism = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([ThistleWonderCell class])];
    if (laughPrism == nil) {
        laughPrism = [[ThistleWonderCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([ThistleWonderCell class])];
    }
    laughPrism.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return laughPrism;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
